#include "dev_layout.h"
#include <stdio.h>

#define LED0 HAL_PORT_A,HAL_Pin_8
#define LED1 HAL_PORT_D,HAL_Pin_2


void DeviceInit()
{
  dev_handle.cpu->systemclock();
  //led init
  dev_handle.led->init(LED0);
  dev_handle.led->init(LED1);
  //lcd-1602 init
  dev_handle.lcd_1602->init();
	
	dev_handle.lcd_1602->demo();
	
  //serial init
	dev_handle.serial->init(HAL_UART1,115200);

	
}


int main()
{ 
  DeviceInit();
	
  while(1)
  {
    
     dev_handle.led->toggle(LED0);
     dev_handle.led->toggle(LED1);
     dev_handle.cpu->delay_ms(500); 	 

  }
	
	return 0;   
}
